<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<script type="text/javascript">
	jQuery(function($){
		//下拉表格初始化
		$('#addDeptId').combobox({
			valueField:'id', //值字段
		    textField:'name', //显示的字段
		    url:'dept/allList',
		    panelHeight:'auto',
		    required:true,
			editable:false//不可编辑，只能选择
		});
	});
	
	function addOrUpdateUser(){
		var r = $('#msaForm').form('validate');
		if(!r) {
			return false;
		}
		var url = "msa/msaAdd";
		if($('#id').val()!='')
	    {
			url = "msa/msaUpdate";
	    }
		$.post(url,$("#msaForm").serializeArray(),function(data){
			$('#MyPopWindow').window('close');
			$('#msaTable').datagrid('reload');  
			$.messager.alert('提示',data.mes,'info');
		});
	}
</script>
<form id="msaForm" method="post" style="margin: 10;text-align: center;">
	<table>
		<tr><td><input name="oper" id="oper" type="hidden"><input id = "creatuserid"  type="hidden" name="creatuserid"></td></tr>
		<tr><td>ID：</td><td><input name="id" style="width: 200" class="easyui-validatebox" required="true"> </td></tr>
		<tr><td>值：</td><td><input name="namea" style="width: 200" class="easyui-validatebox" required="true"> </td></tr>
		<tr><td>分类ID：</td><td><input name="kindid" style="width: 200" class="easyui-validatebox" required="true"></td></tr>
		<tr><td>分类名称：   </td><td><input name="namek" style="width: 200" class="easyui-validatebox" required="true"></td></tr>
		<tr><td>排序：</td><td><input name="sort" class="easyui-validatebox" style="width: 200" required="true"></td></tr>
		<tr><td>扩展：</td><td><input name="reserve01" style="width: 200" required="true"></td></tr>
	</table>
	<a href="#" id="btn-back" onclick="closeWindow();" class="easyui-linkbutton" iconCls="icon-back">返回</a>
	<a href="#" id="btn-add" onclick="addOrUpdateUser();" class="easyui-linkbutton" iconCls="icon-save">保存</a>
</form>